<script>
	export default {
		onLaunch: function() {
			uni.showLoading({
				title:"正在加载中..."
			})
			// #ifndef APP-PLUS || H5
			let updateManager = uni.getUpdateManager();
			updateManager.onCheckForUpdate((result)=>{
				console.log(result.hasUpdate)
			})
			updateManager.onUpdateReady(function () {
			  uni.showModal({
			    title: '更新提示',
			    content: `新版本已经准备好，是否重启应用?本次版本更新:新增翻译功能`,
			    success: function (res) {
			      if (res.confirm) {
			        // 新的版本已经下载好，调用 applyUpdate 应用新版本并重启
			        updateManager.applyUpdate()
			      }
			    }
			  })
			})
			// https://roseannepark.love/ins_img/roses_are_roiseHeadPortrait.jpg
			// https://roseannepark.love/ins_img/roses_are_rosieHeadPortrait.jpg
			// #endif
			// let info = uni.getSystemInfoSync();
			uni.getSystemInfo({
				success:(res)=>{
					this.$store.commit("setPixelRatio",res.pixelRatio);
					this.$store.commit("setPlatform",res);
				},
				fail:(err)=>{
					
				}
			})
			let userinfo = uni.getStorageSync('userinfo');
			if(userinfo){
				let info = JSON.parse(userinfo);
				// console.log('info',info)
				this.$store.commit('setUser',info);
			}else{
				console.log('暂时没有登录')
			}
			// #ifdef MP-WEIXIN
				// wx.cloud.init({
				// 	env:'roseannepark-2g0ct2fc77366e7c'
				// })
			// #endif
		},
		onShow: function() {
			console.log('App Show')
		},
		onHide: function() {
			console.log('App Hide')
		}
	}
</script>

<style lang="scss">
	@import "@/uni_modules/uview-ui/index.scss";
	/*每个页面公共css */
	
	page,view,video{
		box-sizing: border-box;
	}
	
	page{
		width: 100%;
		height: 100%;
	}
	
	
	
	/deep/ .uni-placeholder{
		height: 0px !important;
	}
	
	/deep/ .uni-nav-bar-text{
		font-weight: 700;
	}
	
	/deep/ .uni-navbar--border{
		border-bottom-color: #eee !important;
	}
	
	.flex-column{
		display: flex;
		flex-direction: column;
	}
	
	.container-text{
		display: flex;
		flex-direction: column;
		justify-content: center;
		align-items: center;
		
		text {
			font-weight: 700 !important;
			color: #141415 !important;
		}
	}
	
	.line2{
		position: relative;
		display: -webkit-box;
		-webkit-box-orient: vertical;
		-webkit-line-clamp: 2;
		overflow: hidden;
	}
	
	.line2::first-line{
		text-indent: 20rpx;
		color: red;
	}
	
	.line2::after{
		position: absolute;
		// content: '...展开';
		bottom: 0;
		right: 10rpx;
		filter: opacity(100%);
	}
	
	.container-flex-item {
		width: 33%;
		min-height: 249rpx;
		aspect-ratio: 1/1;
	}
	
	.container-2h{
		height: 500rpx;
	}
	
	.container-flex {
		display: flex;
		flex-wrap: wrap;
		margin-top: 6rpx;
		justify-content: space-between;
		padding: 0 4rpx;
	}
	
	view{
		box-sizing: content-box;
	}
	
	.flex{
		display: flex;
	}
	
	.flex-start{
		justify-content: flex-start;
	}
	
	.container-tab {
		display: flex;
		justify-content: space-around;
		flex-wrap: nowrap;
	
		.container-tab-item {
			display: inline-flex;
			flex:1;
			height: 100rpx;
			justify-content: center;
			align-items: center;
			padding: 2rpx 4rpx;
		}
	
		.container-tab-item-activate {
			position: relative;
		}
	
		.container-tab-item-activate:before {
			content: "";
			width: 100%;
			position: absolute;
			bottom: 0%;
			left: 50%;
			transform: translateX(-50%);
			border-bottom: 4rpx solid #414141;
			transition: all 1s linear;
		}
	}
	
	.font700{
		font-weight: 700;
	}
	
	.font-size-2{
		font-size: 2rem;
	}
	
	.blue{
		color: deepskyblue;
	}
	
	.center{
		justify-content: center;
		align-items: center;
	}
	
	.w100{
		width: 100%;
	}
	
	.h100{
		height: 100%;
	}
	
	
	@for $var from 10 through 100 {
		.row-gap-#{$var}{
			row-gap: $var * 1rpx;
		}
		.colum-gap-#{$var}{
			column-gap: $var * 1rpx;
		}
	}
	
	// .row-gap-10{
	// 	row-gap: 10rpx;
	// }
	
	// .row-gap-20{
	// 	row-gap: 20rpx;
	// }
	
	
	.flex1{
		flex:1;
	}
	
	.flex2{
		flex:2;
	}
	
	.flex3{
		flex:3;
	}
	
	.flex4{
		flex:4;
	}
	
	.flex5{
		flex:5;
	}
	
	.drawer-mask {
		position: absolute;
		inset: 0;
		background-color: rgba(10, 0, 0, 0.5);
		z-index: 1000;
	}
	
	.padding10{
		padding: 10rpx;
	}
	
	.padding-top-10{
		padding-top: 10rpx;
	}
	
	.padding-bottom-10{
		padding-bottom: 10rpx;
	}
	
	.padding-bottom-5{
		padding-bottom: 5rpx;
	}
	
	.padding-top-5{
		padding-top: 5rpx;
	}
	
	.padding-vertical-10{
		padding: 10rpx 0;
	}
	
	.padding-cross-10{
		padding: 0rpx 10rpx;
	}
	
	.margin-vertical-10{
		margin: 10rpx 0;
	}
	
	.fixed{
		position: fixed;
		left:0;
		right:0;
		top: 0;
		bottom: 0;
		background-color: rgba(10, 0, 0, 0.5);
		z-index:1000;
	}
	
	.flex-sb{
		justify-content: space-between;
	}
	
	.flex-sa{
		justify-content: space-around;
	}
	
	.flex-se{
		justify-content: space-evenly;
	}
	
	.opacity1{
		opacity: 0.1;
	}
	
	.opacity2{
		opacity: 0.2;
	}
	.opacity3{
		opacity: 0.3;
	}
	.opacity4{
		opacity: 0.4;
	}
	.opacity5{
		opacity: 0.5;
	}
	.opacity6{
		opacity: 0.6;
	}
	.grid{
		display: grid;
	}
	
	.grid-column-3{
		grid-template-columns: repeat(3,33%);
	}
	
	.grid-row-auto{
		grid-template-rows: auto;
	}
	
	.grid-flow{
		grid-auto-flow: dense;
	}
	
	.grid-video{
		grid-row: span 2;
	}
	
	.image100{
		width: 100%;
		height: auto;
		aspect-ratio: 1/1;
	}
	
	.image-cover{
		object-fit: cover;
	}
	
	.video100{
		height: 100%;
		width: 100%;
	}
	
	.scroll-y{
		overflow-y: scroll;
	}
	
	.box{
		box-sizing: border-box;
	}
	
	.move-50{
		transform: translateY(50%);
	}
	
	.bg-gray{
		background-color: #eeeeee;
	}
	
	.br-10{
		border-radius: 10%;
	}
	
	.br-20{
		border-radius: 20%;
	}
	
	.stick{
		position: fixed;
		bottom: -1rpx;
		z-index: 999;
	}
	
	.stick-top{
		position: fixed;
		top: 0;
		z-index: 999;
	}
	
	.bg-gray2{
		background-color: #ebebeb;
	}
	
	.bg-white{
		background-color: #fff;
	}
	
	.white{
		color: #fff;
	}
	
	.flex-right{
		justify-content: flex-end;
	}
	
	.flex-left{
		justify-content: flex-start;
	}
	
	.flex-just{
		justify-content: center;
	}
	
	.flex-align{
		align-items: center;
	}
	
	.check-circle{
		border-radius: 50%;
	}
	
	.hidden{
		overflow: hidden;
	}
	
	.test{
		position: absolute;
	}
	
	.relative{
		position: relative;
	}
	
	.absolute{
		position: absolute;
	}
	
	.z999{
		z-index: 999;
	}
	
	.z1000{
		z-index: 1000;
	}
	
	.z998{
		z-index: 998;
	}
	
	.bottom0{
		bottom: 0;
	}
	
	.font08{
		font-size: .8rem;
	}
	
	.image-h2{
		width: 100%;
		height: 100%;
	}
	
	.driver{
		width: 100%;
		height: 2rpx;
		background-color: #acacac;
	}
	
	.overflowy{
		overflow-y: scroll;
	}
	
	.overflowx{
		overflow-x: scroll;
	}
	
	.margin-horizontal-10{
		margin:0 10rpx;
	}
	
	.margin-horizontal-30{
		margin: 0 30rpx;
	}
</style>
